{"version":3,"file":"jspdf.plugin.addimage.min.js","sources":["jspdf.plugin.addimage.js"],"names":["jsPDFAPI","namespace","getJpegSize","imgData","width","height","charCodeAt","Error","blockLength","i","len","length","putImage","img","objectNumber","this","internal","newObject","out","write","putStream","constructor","Array","trns","putResourcesCallback","images","collections","call","putXObjectsDictCallback","image","addImage","imageData","format","x","y","w","h","nodeType","canvas","document","createElement","clientWidth","clientHeight","ctx","getContext","drawImage","toDataURL","toUpperCase","imageIndex","coord","getCoordinateString","vcoord","getVerticalCoordinateString","substring","atob","replace","Object","keys","o","e","hasOwnProperty","events","subscribe","dims","info","cs","bpc","f","data","scaleFactor","jsPDF","API"],"mappings":"CA2BC,SAAUA,GACX,YAEA,IAAIC,GAAY,WAKhB,IAAIC,GAAc,SAASC,GAC1B,YACA,IAAIC,GAAOC,CAEX,KAAKF,EAAQG,WAAW,KAAO,MAC7BH,EAAQG,WAAW,KAAO,MAC1BH,EAAQG,WAAW,KAAO,MAC1BH,EAAQG,WAAW,KAAO,MAC1BH,EAAQG,WAAW,KAAO,IAAIA,WAAW,KACzCH,EAAQG,WAAW,KAAO,IAAIA,WAAW,KACzCH,EAAQG,WAAW,KAAO,IAAIA,WAAW,KACzCH,EAAQG,WAAW,KAAO,IAAIA,WAAW,KACzCH,EAAQG,WAAW,MAAQ,EAAM,CACjC,KAAM,IAAIC,OAAM,2CAElB,GAAIC,GAAcL,EAAQG,WAAW,GAAG,IAAMH,EAAQG,WAAW,EACjE,IAAIG,GAAI,EAAGC,EAAMP,EAAQQ,MACzB,OAAQF,EAAIC,EAAM,CACjBD,GAAKD,CACL,IAAIL,EAAQG,WAAWG,KAAO,IAAM,CACnC,KAAM,IAAIF,OAAM,oDAEjB,GAAIJ,EAAQG,WAAWG,EAAE,KAAO,KAC5BN,EAAQG,WAAWG,EAAE,KAAO,KAC5BN,EAAQG,WAAWG,EAAE,KAAO,KAC5BN,EAAQG,WAAWG,EAAE,KAAO,KAC5BN,EAAQG,WAAWG,EAAE,KAA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